package com.xja.friend.service.impl;

import com.xja.friend.entity.Friend;
import com.xja.friend.mapper.FriendMapper;
import com.xja.friend.service.FriendService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service("friendService")
public class FriendServiceImpl implements FriendService {
    @Resource
    private FriendMapper friendMapper;
    @Transactional(propagation=Propagation.REQUIRED)
    public void insert(Friend friend) throws Exception {
        friendMapper.insert(friend);
    }
}
